package io.kiki.sba.registry.server.clientInterface.acceptor;

import io.kiki.sba.registry.common.model.ClientToClientInterfaceServerNodeId;
import io.kiki.sba.registry.server.clientInterface.node.service.DataStoreNodeService;
import org.springframework.beans.factory.annotation.Autowired;


public class WriteDataAcceptorImpl implements WriteDataAcceptor {

    @Autowired
    DataStoreNodeService dataStoreNodeService;

    public void accept(WriteDataRequest request) {
        ClientToClientInterfaceServerNodeId clientToClientInterfaceServerNodeId = request.getClientToClientInterfaceServerNodeId();
        WriteDataProcessor writeDataProcessor = new WriteDataProcessor(dataStoreNodeService, clientToClientInterfaceServerNodeId);
        writeDataProcessor.process(request);
    }
}
